/**
 * Created by pactera on 2018/7/27.
 */

var vm = new Vue({
    el:"#category",
    data:{
        categoryColumn:[
            {type: 'selection', width: 60,align: 'center'},
            {title: '标题',key: 'title'},
            {title: '图片',  key: 'photo',
                columns: {'width':'50px' },
                render: function(h, params) {
                    return h('div', [
                        h('img', { attrs: { src: params.row.background },
                            style: {width: '70px',height: '70px',borderRadius:'100%' }
                        }),
                    ]);
                }
            },
            {title: '创建人',key: 'createAccount.account',align: 'center',
                render: function(h, params) {
                    return h('div', [
                        h('strong', params.row.createAccount.account)
                    ]);
                }},
            {title: '添加时间',key: 'createdDate'},
            {title: '修改人',key: 'updateAccount.account',align: 'center',
                render: function(h, params) {
                    return h('div', [
                        h('strong', params.row.updateAccount ? params.row.updateAccount.account:"")
                    ]);
                }},
            {title: '更新时间',key: 'updateDate'}
        ],
        categorys:[],
        formItem: {},
        showList: false,
        imageUrl:'http://localhost:9098/media/default.jpg',
        pageSize: 2,
        totalElements:20,
        page:0,
        selectRows:[]
    },
    
    methods:{
        back: function () {
            
        },
        saveOrUpdate: function () {
            
        }
    }
});
